#defines
CPPFLAGS = -Wall -D_LINUX_ -fPIC
CPP = g++
LIBS = libLibThread.a
AR = ar
LDFLAGS = -cqs $(LIBS)
VERSION ?= 1.0.0
DEBUG ?= FALSE

ifeq ($(DEBUG), TRUE)
CPPFLAGS += -g -D_DEBUG
else
CPPFLAGS += -O2
endif

OBJS += \
	AbstractThread.o \
	AbstractEventQueue.o \
	AbstractTimerThread.o \
	TimeWaiter.o \

#rules
$(OBJS) : $(HEADERS)  
%.o : %.cpp %.h
	$(CPP) -c $(CPPFLAGS) $< -o $@

$(LIBS) : $(OBJS)
	$(AR) $(LDFLAGS) $^

.PHONY : clean
.DEFAULT : all

all : $(LIBS)

clean :
	@rm -f *.o *.a*
